package top.hcode.hoj.pojo.entity.course;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import top.hcode.hoj.pojo.entity.problem.Problem;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="课程作业", description="")
public class LessonWorkQuestion implements Serializable {

    private static final long serialVersionUID = -843594678585849361L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "课时id")
    private Long lessonId;

    @ApiModelProperty(value = "习题id")
    private Long questionId;

    @ApiModelProperty(value = "编程题id")
    private Long problemId;

    @ApiModelProperty(value = "排序")
    private Integer sortOrder;

    @ApiModelProperty(value = "作业类型，lesson 课堂练习，home 课后作业")
    private String workType;

    @ApiModelProperty(value = "题目类型：1：单选题，2：多选题，3：填空题，9：编程题")
    private Integer questionType;

    @TableField(fill = FieldFill.INSERT)
    private Date gmtCreate;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date gmtModified;

    /*关联字段*/
    @TableField(exist = false)
    private Lesson lesson;

    @TableField(exist = false)
    private Question question;

    @TableField(exist = false)
    private Problem problem;

}
